package mvc.helix;


public class HelixSetter {

	protected HelixModel model;
	
	public HelixSetter(HelixModel model) {
		this.model = model;
	}
	
	public void setR(float r, boolean increment) {
		if(increment){
			float oldR = model.getR();
			model.setR(oldR+r);
		}else model.setR(r);
		model.notifyAllViews();
	}
	public void setR(float r) {
		model.setR(r);
		model.notifyAllViews();
	}
	
	public void setK(float k, boolean increment) {
		if(increment){
			float oldK = model.getK();
			model.setK(oldK+k);
		}else model.setK(k);
		model.notifyAllViews();
	}
	public void setK(float k) {
		model.setK(k);
		model.notifyAllViews();
	}

	public void setMAXT(float m, boolean increment) {
		if(increment){
			float oldK = model.getMAXT();
			model.setMAXT(oldK+m);
		}else model.setMAXT(m);
		model.notifyAllViews();
	}
	public void setMAXT(float m) {
		model.setMAXT(m);
		model.notifyAllViews();
	}
}
